package cn.kgc.biz.controller;

import cn.kgc.biz.service.HotelRoomService;
import cn.kgc.biz.vo.HotelRoomVo;
import cn.kgc.dto.Dto;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/hotelroom/")
public class HotelRoomController {
    @Resource
    private HotelRoomService hotelRoomService;
    @PostMapping("queryhotelroombyhotel")
    public Dto queryHotelRoomByHotel(@RequestBody HotelRoomVo hotelRoomVo){
        return hotelRoomService.queryHotelRoomByHotel(hotelRoomVo);
    }
    @GetMapping(value = "queryhotelroombed")
    public Dto queryHotelRoomBed(){
        return hotelRoomService.queryHotelRoomBed();
    }
    @GetMapping(value = "getimg/{hotelId}")
    public Dto queryRoomImgByHotelId(@PathVariable("hotelId") String hotelId){
        return hotelRoomService.queryRoomImgByHotelId(Long.parseLong(hotelId));
    }
}
